package com.akcome.apollo.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.akcome.apollo.domain.BmpIncome;

/**
 * 收益记录Service接口
 *
 * @author wn
 * @version $v: 1.0.0, $time:2017-12-26 08:49:00 Exp $
 */
public interface BmpIncomeService{

	BmpIncome save(BmpIncome bmpIncome);
	
	BmpIncome findOne(Long id);

	Double sumAmountByAccountIdAndCoinTypeAndDate(Long accountId, String coinType, String date);

	Page<BmpIncome> findByPage(Long accountId, String payMode, String coinType, Pageable page);

	int countByAccountId(Long accountId);

	/**
	 * 待支付收益
	 * @param accountId
	 * @param coinType
	 * @return
	 */
	Double sumEarn(Long accountId, String coinType);

	/**
	 * 历史总收益
	 * @param accountId
	 * @param coinType
	 * @return
	 */
	Double totalIncome(Long accountId, String coinType);
}
